#ifndef _AIP1629_H_
#define _AIP1629_H_

#include "Arduino.h"
// AIP1629 4-SPI IO
#define AIP1629_STB 10
#define AIP1629_DIN 11
#define AIP1629_DIO 12
#define AIP1629_CLK 13
// 行为定义
#define AIP1629_STB_HIGH()  digitalWrite(AIP1629_STB, 1)              
#define AIP1629_STB_LOW()   digitalWrite(AIP1629_STB, 0)               
#define AIP1629_CLK_HIGH()  digitalWrite(AIP1629_CLK, 1)  
#define AIP1629_CLK_LOW()   digitalWrite(AIP1629_CLK, 0)             
#define AIP1629_DIO_HIGH()  digitalWrite(AIP1629_DIO, 1)          
#define AIP1629_DIO_LOW()   digitalWrite(AIP1629_DIO, 0)

void  AIP1629_SendCmd(uint8_t cmd);
void  AIP1629_SendAddr(uint8_t addr);
void  AIP1629_WriteByte(uint8_t addr, uint8_t dat);
void  AIP1629_WriteBlock(uint8_t addr, uint8_t len, uint8_t* buf);
  
#endif
